﻿namespace JxcLite.Services;

/// <summary>
/// 系统基础数据服务接口。
/// </summary>
public interface IBaseDataService : IService
{
    /// <summary>
    /// 分页查询商品信息。
    /// </summary>
    /// <param name="criteria"></param>
    /// <returns></returns>
    Task<PagingResult<JxGoods>> QueryGoodsesAsync(PagingCriteria criteria);

    /// <summary>
    /// 获取所有商品信息。
    /// </summary>
    /// <returns></returns>
    Task<List<JxGoods>> GetGoodsesAsync();

    /// <summary>
    /// 批量删除商品信息。
    /// </summary>
    /// <param name="models"></param>
    /// <returns></returns>
    Task<Result> DeleteGoodsesAsync(List<JxGoods> models);

    /// <summary>
    /// 保存商品信息。
    /// </summary>
    /// <param name="info"></param>
    /// <returns></returns>
    Task<Result> SaveGoodsAsync(UploadInfo<JxGoods> info);

    /// <summary>
    /// 分页查询客户或供应商信息，查询条件添加Type字段筛选。
    /// </summary>
    /// <param name="criteria"></param>
    /// <returns></returns>
    Task<PagingResult<JxPartner>> QueryPartnersAsync(PagingCriteria criteria);

    /// <summary>
    /// 批量删除客户或供应商信息。
    /// </summary>
    /// <param name="models"></param>
    /// <returns></returns>
    Task<Result> DeletePartnersAsync(List<JxPartner> models);

    /// <summary>
    /// 保存客户或供应商信息。
    /// </summary>
    /// <param name="info"></param>
    /// <returns></returns>
    Task<Result> SavePartnerAsync(UploadInfo<JxPartner> info);
}